package patrol.mobile.com.mobilepatrol.utils;

import java.util.HashMap;

import patrol.mobile.com.mobilepatrol.manager.UserManager;

/**
 * Created by admin on 2018/9/16.
 * 公共参数
 */

public final class CommonParamsHelper {

    /**
     * @return 获取当前用户ID，当前时间，当前机构名称。
     */
    public static HashMap<String, String> getIdDateBmnameMap() {
        String current_id = (String) SPUtils.get(Constants.current_id, "");
        String currentDate = DateUtil.getCurrentDate(DateUtil.format1);
        String bmname = UserManager.getUser(current_id).bmname;
        String bmcode = UserManager.getUser(current_id).bmcode;
        String username = UserManager.getUser(current_id).ryname;
        String uuid = PKCreator.getPrimaryKey();
        HashMap<String, String> map = new HashMap<>();
        map.put("upUserId", current_id);
        map.put("upUserName", username);
        map.put("upDate", currentDate);
        map.put("orgId", bmcode);
        map.put("orgName", bmname);
        map.put("id", uuid);
        return map;
    }
}
